<!DOCTYPE hmtl>
<!--
This page toggles focus on an input field on click events and is used to test
that focus gain spawns the keyboard and focus loss hides it.
-->
<html>
  <head>
    <style>
      html, body {
        height: 100%;
        margin: 0;
      }
      #divtoclick {
        min-height: 100%;
      }
    </style>
  </head>
  <script>
    var focused = false;
    function toggleFocusOnClick() {
      if (focused) {
        document.getElementById("input").blur();
      } else {
        document.getElementById("input").focus();
      }
      focused = !focused;
    }
  </script>
  <body>
    <div id="divtoclick" onclick="toggleFocusOnClick()">
      <input id="input"></input>
    </div>
  </body>
</html>
